using System;
using System.ComponentModel.DataAnnotations;
using ERP.Common.DTO;
using Volo.Abp.Application.Dtos;

namespace ERP.ERPSystem.ProductionSystem.Dto
{
    /// <summary>
    /// 用于显示生产废料单的DTO
    /// </summary>
    public class ProductionWasteOrderDto : EntityDto<int>
    {
        public string WasteOrderCode { get; set; }
        public string WasteOrderName { get; set; }
        public string ProductionWorkOrder { get; set; }
        public DateTime WasteDate { get; set; }
        public string OrderStatus { get; set; }
        public string WarehouseName { get; set; }
        public string Creator { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 用于创建/更新生产废料单的DTO
    /// </summary>
    public class CreateUpdateProductionWasteOrderDto
    {
        [Required(ErrorMessage = "废料单编号是必填的")]
        [StringLength(30)]
        public string WasteOrderCode { get; set; }

        [Required(ErrorMessage = "废料单名称是必填的")]
        [StringLength(50)]
        public string WasteOrderName { get; set; }

        [Required(ErrorMessage = "生产工单编码是必填的")]
        [StringLength(30)]
        public string ProductionWorkOrder { get; set; }

        [Required(ErrorMessage = "废料日期是必填的")]
        public DateTime WasteDate { get; set; }

        [Required(ErrorMessage = "创建人是必获取到的")]
        [StringLength(20)]
        public string Creator { get; set; } = "admin";

        [Required(ErrorMessage = "单据状态是必填的")]
        [StringLength(20)]
        public string OrderStatus { get; set; }

        [Required(ErrorMessage = "仓库名称是必填的")]
        [StringLength(50)]
        public string WarehouseName { get; set; }
    }

    /// <summary>
    /// 生产废料单查询数据传输对象
    /// </summary>
    public class GetProductionWasteOrderInputDto
    {
        public string WasteOrderCode { get; set; }
        public string WasteOrderName { get; set; }
        public int Page { get; set; }
        public int Limit { get; set; }
    }
} 